<?php
require_once "../libs/ttServer.php";

$tt = new ttServer();
$id = secureGET("id");
$data = $tt->mblog_dir($id);

/* 输出页面 */
echo '<?xml version="1.0" encoding="utf-8"?>';
echo '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">';
echo '<html xmlns="http://www.w3.org/1999/xhtml">';
echo '<head>';
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>';
echo '<meta http-equiv="Pragma" content="no-cache"/>';
echo '<meta http-equiv="Cache-Control" content="no-cache"/>';
echo '<meta http-equiv="Expires" content="0"/>';
//echo '<link href="mblog_style.css" rel="stylesheet" type="text/css" />';
echo  '<title>目录 - miniblog - 游味</title>';
echo '</head>';

echo '<body>';

if($data)
{	
		echo '<h1>';
		echo '目录';
		echo '</h1>';
		
		$count = count($data);
		echo '<ul>';
		for ($i = 0; $i < $count; $i++)
		{
			echo sprintf('<li><a href="index.php?id=%d">%s</a></li>', $data[$i]['id'],  $data[$i]['title']);
		}
		echo '</ul>';
		
		echo '<br /><br />';
		
		echo '<div id="next">';	
		echo sprintf('<div>回到：<a href="dir.php">目录</a></div>');
		echo '<div>我要：<a href="add.php">投递一篇</a></div>';
		echo '</div>';
}

// footer
echo '<br /><br />';
echo '<div id="footer">';
echo '游味作品. 版权所有 @2010';
echo '</div>';

echo '</body>';
echo '</html>';
//echo json_encode($data);

?>
<script src="http://s14.cnzz.com/stat.php?id=2246917&web_id=2246917&show=pic1" language="JavaScript"></script>